\(\int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{a+b \sin (e+f x)} \, dx\) [40]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [F(-1)]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 33, antiderivative size = 154 \[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{a+b \sin (e+f x)} \, dx=\frac {2 c \operatorname {EllipticPi}\left (2,\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{a f \sqrt {c+d \sin (e+f x)}}-\frac {2 (b c-a d) \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{a (a+b) f \sqrt {c+d \sin (e+f x)}} \]

[Out]

-2*c*(sin(1/2*e+1/4*Pi+1/2*f*x)^2)^(1/2)/sin(1/2*e+1/4*Pi+1/2*f*x)*EllipticPi(cos(1/2*e+1/4*Pi+1/2*f*x),2,2^(1
/2)*(d/(c+d))^(1/2))*((c+d*sin(f*x+e))/(c+d))^(1/2)/a/f/(c+d*sin(f*x+e))^(1/2)+2*(-a*d+b*c)*(sin(1/2*e+1/4*Pi+
1/2*f*x)^2)^(1/2)/sin(1/2*e+1/4*Pi+1/2*f*x)*EllipticPi(cos(1/2*e+1/4*Pi+1/2*f*x),2*b/(a+b),2^(1/2)*(d/(c+d))^(
1/2))*((c+d*sin(f*x+e))/(c+d))^(1/2)/a/(a+b)/f/(c+d*sin(f*x+e))^(1/2)

Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {3014, 2886, 2884} \[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{a+b \sin (e+f x)} \, dx=\frac {2 c \sqrt {\frac {c+d \sin (e+f x)}{c+d}} \operatorname {EllipticPi}\left (2,\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right ),\frac {2 d}{c+d}\right )}{a f \sqrt {c+d \sin (e+f x)}}-\frac {2 (b c-a d) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right ),\frac {2 d}{c+d}\right )}{a f (a+b) \sqrt {c+d \sin (e+f x)}} \]

[In]

Int[(Csc[e + f*x]*Sqrt[c + d*Sin[e + f*x]])/(a + b*Sin[e + f*x]),x]

[Out]

(2*c*EllipticPi[2, (e - Pi/2 + f*x)/2, (2*d)/(c + d)]*Sqrt[(c + d*Sin[e + f*x])/(c + d)])/(a*f*Sqrt[c + d*Sin[
e + f*x]]) - (2*(b*c - a*d)*EllipticPi[(2*b)/(a + b), (e - Pi/2 + f*x)/2, (2*d)/(c + d)]*Sqrt[(c + d*Sin[e + f
*x])/(c + d)])/(a*(a + b)*f*Sqrt[c + d*Sin[e + f*x]])

Rule 2884

Int[1/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Simp
[(2/(f*(a + b)*Sqrt[c + d]))*EllipticPi[2*(b/(a + b)), (1/2)*(e - Pi/2 + f*x), 2*(d/(c + d))], x] /; FreeQ[{a,
 b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[c + d, 0]

Rule 2886

Int[1/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Dist
[Sqrt[(c + d*Sin[e + f*x])/(c + d)]/Sqrt[c + d*Sin[e + f*x]], Int[1/((a + b*Sin[e + f*x])*Sqrt[c/(c + d) + (d/
(c + d))*Sin[e + f*x]]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && N
eQ[c^2 - d^2, 0] &&  !GtQ[c + d, 0]

Rule 3014

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/(sin[(e_.) + (f_.)*(x_)]*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])
), x_Symbol] :> Dist[a/c, Int[1/(Sin[e + f*x]*Sqrt[a + b*Sin[e + f*x]]), x], x] + Dist[(b*c - a*d)/c, Int[1/(S
qrt[a + b*Sin[e + f*x]]*(c + d*Sin[e + f*x])), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] &&
NeQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {c \int \frac {\csc (e+f x)}{\sqrt {c+d \sin (e+f x)}} \, dx}{a}+\frac {(-b c+a d) \int \frac {1}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{a} \\ & = \frac {\left (c \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {\csc (e+f x)}{\sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{a \sqrt {c+d \sin (e+f x)}}+\frac {\left ((-b c+a d) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{(a+b \sin (e+f x)) \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{a \sqrt {c+d \sin (e+f x)}} \\ & = \frac {2 c \operatorname {EllipticPi}\left (2,\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{a f \sqrt {c+d \sin (e+f x)}}-\frac {2 (b c-a d) \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{a (a+b) f \sqrt {c+d \sin (e+f x)}} \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 30.02 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.16 \[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{a+b \sin (e+f x)} \, dx=\frac {2 i \left (\operatorname {EllipticPi}\left (\frac {c+d}{c},i \text {arcsinh}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right ),\frac {c+d}{c-d}\right )-\operatorname {EllipticPi}\left (\frac {b (c+d)}{b c-a d},i \text {arcsinh}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right ),\frac {c+d}{c-d}\right )\right ) \sec (e+f x) \sqrt {-\frac {d (-1+\sin (e+f x))}{c+d}} \sqrt {\frac {d (1+\sin (e+f x))}{-c+d}}}{a \sqrt {-\frac {1}{c+d}} f} \]

[In]

Integrate[(Csc[e + f*x]*Sqrt[c + d*Sin[e + f*x]])/(a + b*Sin[e + f*x]),x]

[Out]

((2*I)*(EllipticPi[(c + d)/c, I*ArcSinh[Sqrt[-(c + d)^(-1)]*Sqrt[c + d*Sin[e + f*x]]], (c + d)/(c - d)] - Elli
pticPi[(b*(c + d))/(b*c - a*d), I*ArcSinh[Sqrt[-(c + d)^(-1)]*Sqrt[c + d*Sin[e + f*x]]], (c + d)/(c - d)])*Sec
[e + f*x]*Sqrt[-((d*(-1 + Sin[e + f*x]))/(c + d))]*Sqrt[(d*(1 + Sin[e + f*x]))/(-c + d)])/(a*Sqrt[-(c + d)^(-1
)]*f)

Maple [A] (verified)

Time = 1.29 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.23

method result size
default \(-\frac {2 \left (\Pi \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \frac {c -d}{c}, \sqrt {\frac {c -d}{c +d}}\right )-\Pi \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, -\frac {\left (c -d \right ) b}{a d -b c}, \sqrt {\frac {c -d}{c +d}}\right )\right ) \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \left (c -d \right )}{a \cos \left (f x +e \right ) \sqrt {c +d \sin \left (f x +e \right )}\, f}\) \(190\)

[In]

int((c+d*sin(f*x+e))^(1/2)/sin(f*x+e)/(a+b*sin(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

-2*(EllipticPi(((c+d*sin(f*x+e))/(c-d))^(1/2),(c-d)/c,((c-d)/(c+d))^(1/2))-EllipticPi(((c+d*sin(f*x+e))/(c-d))
^(1/2),-(c-d)*b/(a*d-b*c),((c-d)/(c+d))^(1/2)))*(-d*(1+sin(f*x+e))/(c-d))^(1/2)*(-(sin(f*x+e)-1)*d/(c+d))^(1/2
)*((c+d*sin(f*x+e))/(c-d))^(1/2)*(c-d)/a/cos(f*x+e)/(c+d*sin(f*x+e))^(1/2)/f

Fricas [F(-1)]

Timed out. \[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{a+b \sin (e+f x)} \, dx=\text {Timed out} \]

[In]

integrate((c+d*sin(f*x+e))^(1/2)/sin(f*x+e)/(a+b*sin(f*x+e)),x, algorithm="fricas")

[Out]

Timed out

Sympy [F]

\[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{a+b \sin (e+f x)} \, dx=\int \frac {\sqrt {c + d \sin {\left (e + f x \right )}}}{\left (a + b \sin {\left (e + f x \right )}\right ) \sin {\left (e + f x \right )}}\, dx \]

[In]

integrate((c+d*sin(f*x+e))**(1/2)/sin(f*x+e)/(a+b*sin(f*x+e)),x)

[Out]

Integral(sqrt(c + d*sin(e + f*x))/((a + b*sin(e + f*x))*sin(e + f*x)), x)

Maxima [F]

\[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{a+b \sin (e+f x)} \, dx=\int { \frac {\sqrt {d \sin \left (f x + e\right ) + c}}{{\left (b \sin \left (f x + e\right ) + a\right )} \sin \left (f x + e\right )} \,d x } \]

[In]

integrate((c+d*sin(f*x+e))^(1/2)/sin(f*x+e)/(a+b*sin(f*x+e)),x, algorithm="maxima")

[Out]

integrate(sqrt(d*sin(f*x + e) + c)/((b*sin(f*x + e) + a)*sin(f*x + e)), x)

Giac [F]

\[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{a+b \sin (e+f x)} \, dx=\int { \frac {\sqrt {d \sin \left (f x + e\right ) + c}}{{\left (b \sin \left (f x + e\right ) + a\right )} \sin \left (f x + e\right )} \,d x } \]

[In]

integrate((c+d*sin(f*x+e))^(1/2)/sin(f*x+e)/(a+b*sin(f*x+e)),x, algorithm="giac")

[Out]

integrate(sqrt(d*sin(f*x + e) + c)/((b*sin(f*x + e) + a)*sin(f*x + e)), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {\csc (e+f x) \sqrt {c+d \sin (e+f x)}}{a+b \sin (e+f x)} \, dx=\int \frac {\sqrt {c+d\,\sin \left (e+f\,x\right )}}{\sin \left (e+f\,x\right )\,\left (a+b\,\sin \left (e+f\,x\right )\right )} \,d x \]

[In]

int((c + d*sin(e + f*x))^(1/2)/(sin(e + f*x)*(a + b*sin(e + f*x))),x)

[Out]

int((c + d*sin(e + f*x))^(1/2)/(sin(e + f*x)*(a + b*sin(e + f*x))), x)